package com.shujia.flink.tf
import  org.apache.flink.streaming.api.scala._

object Demo02Union {
  def main(args: Array[String]): Unit = {

    val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment

    val listDS1: DataStream[Int] = env.fromCollection(List(1, 6, 9, 8, 7))
    val listDS2: DataStream[Int] = env.fromCollection(List(11, 55, 66, 99, 88))

    /**
     * union:将两个类型相同的DS合并
     *
     */

    val unionDS: DataStream[Int] = listDS1.union(listDS2)
    val ListDS: DataStream[Int] = listDS2.union(listDS1)
    unionDS.print()
    ListDS.print()











  env.execute()

  }

}
